package com.zhm.demo.cfg;

/**
 * ClassName: MessageConverter
 * Description:
 * date: 2023/12/20 16:02
 *
 * @author liuly
 */

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * GRPC配置类
 */
@Component
/*@GrpcClientBean(
        clazz = MessageRpcGrpc.MessageRpcBlockingStub.class,
        beanName = "messageRpcBlockingStub",
        client = @GrpcClient("grpc-message-server")
)
@GrpcClientBean(
        clazz = UserGrpc.UserBlockingStub.class,
        beanName = "userBlockingStub",
        client = @GrpcClient("grpc-user-server")
)*/
public class GrpcConfig {



    @Value("${grpc.client.grpc-user-server.address}")
    private String userAddress;

    @PostConstruct
    public void success() {
        System.out.println("*********GrpcConfig加载成功*********");
        System.out.println(String.format("*********userAddress:%s*********", userAddress));
    }
}